bubbleSort=function(arr){
    let temp
    let out=arr.length
    for(let i=0;i<out;i++){
        flag=true
        for(let j=out-1;j>i;--j){
            if(arr[j-1]>arr[j]){
                temp=arr[j]
                arr[j]=arr[j-1]
                arr[j-1]=temp
                flag=false
            }
        }
        if(flag){
            break
        }
    }
    console.log(arr)
}
let old=Date.now()
bubbleSort([2,3,1,5,6,78,9,90,232,34,4,5,6,67,78,89,10])
console.log(Date.now()-old)